home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 32
/
Aminet 32 (1999)(Schatztruhe)[!][Aug 1999].iso
/
Aminet
/
biz
/
dopus
/
IfxDopus.lha
/
IFx.dopus
next >
Wrap
Text File
|
1999-05-26
|
2KB
|
98 lines
/*
* Load selected files and directories from a DOpus5 lister into Ifx.
* If an Ifx port is found, entries are loaded into a running Ifx.
* Otherwise Ifx is invoked first, using appropriate stack size.
*
* Created by Richard Wheeldon by modifying an existing script for Emacs
* by David Lübbren.
*
* Note: As I start the 'fifo-handler' in my User-startup I only test
* for its presence in this script.
*
* Tested using ImageFX 3.3 beta 2 and Dopus 5.8
*
* Call: Arexx DOpus5:Arexx/Ifx.dopus5 {Qp}
*
*/
StackSize = 60000
IfxPort = 'IMAGEFX.1'
IfxCmd = 'Run <nil: >nil: Imagefx3:Imagefx'
DefaultDir = 'ram:'
message = 'Loading into Ifx...'
lf = '0a'x
OPTIONS RESULTS
PARSE ARG dopusport
IF dopusport ~= "" THEN ADDRESS VALUE dopusport
ELSE DO
SAY "No DOpus running !"
EXIT
END
SourcePath = DefaultDir
NoLister = 1
lister query source
IF rc = 0 THEN DO
PARSE VAR result handle .
NoLister = 0
lister set handle busy on
lister query handle path
IF rc = 0 THEN DO
SourcePath = STRIP(result, 'B', '"')
lister query handle selentries stem Entry.
END
END
IF ~SHOW('Ports', IfxPort) THEN DO
PRAGMA('Stack', StackSize)
PRAGMA('Directory', SourcePath)
ADDRESS COMMAND
IfxCmd
'WaitForPort' IfxPort
ADDRESS
IF rc = 5 THEN DO
dopus request '"Can''t find ImageFX port '''IfxPort'''" Cancel'
SIGNAL quitit
END
END
IF NoLister = 0 & Entry.count > 0 THEN DO
lister set handle progress Entry.count message
lister set handle title message
lister refresh handle full
DO i=0 TO Entry.count-1
lister query handle abort
IF result THEN
SIGNAL quitit
lister set handle progress count i+1
lister set handle progress name Entry.i
ADDRESS VALUE IfxPort
'LOADBUFFER ' || SourcePath || Entry.i ' NEW'
ADDRESS
lister select handle '"' || Entry.i || '"' off
lister refresh handle
END
END
SIGNAL quitit
quitit:
IF NoLister = 0 THEN DO
lister set handle title
lister refresh handle full
lister set handle busy off
END
EXIT